/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.is.city;

import org.geotools.map.MapLayer;
import org.is.city.routemanager.Layers.PointsLayer;
import org.is.city.routemanager.Layers.RouteLayer;

/**
 * Фильтр слоев.
 * @author oleg
 */
public class LayersFilter {
    static public boolean isRoute(MapLayer layer){
        if(layer.getFeatureSource().getSchema().getGeometryDescriptor().getType().getName().toString().equals("MultiLineString")){
            return true;
        }
        return false;
    }

    static public boolean isUnknown(MapLayer layer){
        if (layer.toLayer() instanceof RouteLayer)
            return false;
        if (layer.toLayer() instanceof PointsLayer)
            return false;
        if (layer.getTitle().contains(new String("temp")))
            return false;
        return true;
    }
}
